import request from "/@/utils/request"
// 获取巡检区域分类树形数据
export function getTreeList(query) {
  return request({
    url: '/om/ominspection/getInspectionList',
    method: 'get',
    params: query
  })
}

// 获取巡检区域分类树形数据
export function getTreeListChild(id) {
  return request({
    url: '/om/ominspectionList/getByNumId/' + id,
    method: 'get'
  })
}
// 获取列表数据
export function getlistData(query) {
  return request({
    url: '/om/ominspectionItems/page',
    method: 'get',
    params: query
  })
}

//批量删除
export function delAllObj(obj) {
  return request({
    url: '/om/ominspectionItems/batchDel',
    method: 'post',
    data: obj
  })
}
// 获取巡检区域分类巡检事项
export function getlist(query) {
  return request({
    url: '/om/ominspectionItems/queryItems/' + query,
    method: 'get'
  })
}
// 修改巡检区域分类巡检事项
export function setList(obj) {
  return request({
    url: '/om/ominspectionItems',
    method: 'put',
    data: obj
  })
}
// 修改巡检区域分类巡检事项
export function addList(obj) {
  return request({
    url: '/om/ominspectionItems',
    method: 'post',
    data: obj
  })
}
// 删除巡检区域分类巡检事项
export function delList(obj) {
  return request({
    url: '/om/ominspectionItems/deleteOutById',
    method: 'post',
    data: obj
  })
}
// 通过巡检区域名称查询
export function getChl(obj) {
  return request({
    url: '/om/ominspectionItems/queryItemsList',
    method: 'post',
    data: obj
  })
}
// 同步事项
export function sytList(obj) {
  return request({
    url: '/om/ominspectionItems/synchronizationItems',
    method: 'post',
    data: obj
  })
}
// 删除大类巡检事项
export function delById(obj) {
  return request({
    url: '/om/ominspectionItems/deleteInById',
    method: 'post',
    data: obj
  })
}
// 删除小类巡检事项
export function delByChild(obj) {
  return request({
    url: '/om/ominspectionItems/deleteInByChildId',
    method: 'post',
    data: obj
  })
}
// 获取部门数据
export function getAdminTree(query) {
  return request({
    url: '/admin/dept/tree',
    method: 'get',
    params: query
  })
}